package com.cubeofnine.utils;

public class Validate {
	public final static boolean isValidEmail(CharSequence target) {
		try {
			return android.util.Patterns.EMAIL_ADDRESS.matcher(target)
					.matches();
		} catch (NullPointerException exception) {
			return false;
		}
	}

	public final static boolean isValidPhone(CharSequence target) {
		try {
			return android.util.Patterns.PHONE.matcher(target).matches();
		} catch (NullPointerException exception) {
			return false;
		}
	}

	public final static boolean isValidWebURL(CharSequence target) {
		try {
			return android.util.Patterns.WEB_URL.matcher(target).matches();
		} catch (NullPointerException exception) {
			return false;
		}
	}
}
